package cn.sofwin.sb.di;

import cn.sofwin.sb.AppConfig;
import cn.sofwin.sb.controller.UserController;
import cn.sofwin.sb.entity.User;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AnnotationDemo {
    public static void main(String[] args) {
        ApplicationContext act=new AnnotationConfigApplicationContext(AppConfig.class);
        /*User user=act.getBean(User.class);
        System.out.println(user);

        Computer computer=act.getBean(Computer.class);
        System.out.println(computer);*/

        UserController con=act.getBean(UserController.class);
        User user=con.findUser(1);
        System.out.println(user);

    }
}
